package com.grace.param;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class TestVo {
    //NotBlank用来判断String类型是否非空
    @NotBlank
    private String msg;

    //NotNull用来判断Integer类型是否非空
    @NotNull(message = "id不可以为空")
    //设置一个区间(1,10)
    @Max(value = 10,message = "id 不能大于10")
    @Min(value = 0,message = "id 至少大于等于0")
    private Integer id;

    @NotEmpty
    private List<String> str;
}
